{% extends "./inc/base.html" %}
{% block content %}
<section class="vbox">
    <header class="header bg-light dk">
        <p>{{controller.meta_title}}</p>
    </header>
    <section class="scrollable wrapper">
        <section class="panel panel-default">
            <div class="search-form">
                <div class="row wrapper">
                    <div class="col-sm-3">
                        <div class="input-group pull-right ">
                            <span class="input-group-addon">信息编号</span>
                            <input type="text" class="input-sm form-control" name="fabu_no" placeholder=""
                                value="{{controller.get('fabu_no')}}">
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group pull-right ">
                            <span class="input-group-addon">商品类别</span>
                            <input type="text" class="input-sm form-control" name="shangpingleibie" placeholder=""
                                value="{{controller.get('shangpingleibie')}}">
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group pull-right ">
                            <span class="input-group-addon">发布方公司名称</span>
                            <input type="text" class="input-sm form-control" name="fabureninfo.gsmc" placeholder=""
                                value="{{controller.get('fabureninfo.gsmc')}}">
                        </div>
                    </div>
                    <div class="col-sm-3">
                        <div class="input-group pull-right ">
                            <span class="input-group-addon">发布方电话</span>
                            <input type="text" class="input-sm form-control" name="fabureninfo.mobile" placeholder=""
                                value="{{controller.get('fabureninfo.mobile')}}">
                        </div>
                    </div>
                </div>
                <div class="row" style="padding:0 15px 15px 15px;">
                    <div class="col-sm-6">
                    </div>
                    <div class="col-sm-3">
                        <span class="input-group-btn">
                            <button style="width: 100%;" class="btn  btn-default" type="button" id="search"
                                url="/{{controller.active}}{%if status %}?status=2{% endif %}">搜索</button>
                        </span>
                    </div>
                    <div class="col-sm-3">
                            <span class="input-group-btn">
                                <button style="width: 100%;" class="btn  btn-default" type="button" id="exportCSV"
                                    url="/{{controller.active}}export">导出</button>
                            </span>
                    </div>
                </div>

            </div>
            <div class="table-responsive" style="position: relative;overflow: auto;width: 100%;">
                <table class="table table-hover b-t b-light" style="table-layout: fixed;">
                    <thead>
                        <tr>
                            <th style="width:60px;" class="text-center">序号</th>
                            <th style="width:120px;">信息编号</th>
                            <th style="width:100px;">发布方类型</th>
                            <th style="width:120px;">发布方电话</th>
                            <th style="width:100px;">发布方姓名</th>
                            <th style="width:180px;">发布方公司名称</th>
                            <th style="width:120px;">商品类别</th>
                            <th style="width:150px;">所在地区</th>
                            <th style="width:100px;">信息类型</th>
                            <th style="width:100px;">信息通道</th>
                            <th style="width:150px;">有效期限</th>
                            <th style="width:100px;" class="text-center">信息详情</th>
                            <th style="width:80px;" class="text-center">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for item in list %}
                        <tr>
                            <td class="text-center">{{loop.index}}</td>
                            <td><a href="/admin/gongxufabu/see/?id={{item.id}}" class="text-info"
                                    data-toggle="ajaxModal">{{item.fabu_no}}</a></td>
                            <td>{{item.fabureninfo.groupid|get_groupname}}</td>
                            <td>{{item.fabureninfo.mobile}}</td>
                            <td>{{item.fabureninfo.real_name}}</td>
                            <td>{{item.fabureninfo.gsmc}}</td>
                            <td>{{item.shangpingleibie}}</td>
                            <td>{{item.diqu}}</td>
                            <td>{{item.xinxileixing|get_gongxutype}}</td>
                            <td>{{item.info_channel|get_channelname}}</td>
                            <td>{{item.chuangjianshijian|moment('YYYY-MM-DD HH:mm:ss',item.youxiaoqi|get_youxiaotianshu)}}</td>
                            <td class="text-center">
                                <a href="/admin/gongxufabu/see/?id={{item.id}}" class="text-info"
                                    data-toggle="ajaxModal">查看</a>
                            </td>
                            <td class="text-center">
                                <a href="/admin/gongxufabu/offsale?id={{item.id}}&operation=下架" class="text-info"
                                    data-toggle="ajaxModal">下架</a>
                            </td>
                        </tr>
                        {% else %}
                        <tr>
                            <td colspan="17">
                                <div class="alert alert-warning alert-block">
                                    <button data-dismiss="alert" class="close" type="button">×</button>
                                    <p>暂无数据</p>
                                </div>
                            </td>
                        </tr>

                        {% endfor %}


                    </tbody>
                </table>
            </div>
            <footer class="panel-footer">
                <div class="row">


                    <div class="col-sm-12 text-right text-center-xs">
                        {{pagerData | safe}}
                    </div>
                </div>
            </footer>
        </section>
    </section>
</section>

{% endblock %}
{% block script%}
<script src="/static/admin/js/parsley/parsley.min.js"></script>
<script src="/static/admin/js/parsley/parsley.extend.js"></script>
{% endblock%}